/*******************************************************************************************
This file is part of Proactive Investigator Analytics.

Proactive Investigator Analytics is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Proactive Investigator Analytics is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Proactive Investigator Analytics.  If not, see <http://www.gnu.org/licenses/>.

This script creates VPN staging tables and indexes for partition switch purpose.

********************************************************************************************/

USE RiskSecurityDW
GO

/****** Object:  Table [dbo].[stg_fact_radius_asa_9]    Script Date: 05/09/2011 13:40:36 ******/
CREATE TABLE [dbo].[stg_fact_radius_asa_9](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_9] ON [dbo].[stg_fact_radius_asa_9] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[stg_fact_radius_asa_8]    Script Date: 05/09/2011 13:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[stg_fact_radius_asa_8](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_8] ON [dbo].[stg_fact_radius_asa_8] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO

SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[stg_fact_radius_asa_7]    Script Date: 05/09/2011 13:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[stg_fact_radius_asa_7](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_7] ON [dbo].[stg_fact_radius_asa_7] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[stg_fact_radius_asa_6]    Script Date: 05/09/2011 13:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[stg_fact_radius_asa_6](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_6] ON [dbo].[stg_fact_radius_asa_6] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[stg_fact_radius_asa_5]    Script Date: 05/09/2011 13:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[stg_fact_radius_asa_5](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_5] ON [dbo].[stg_fact_radius_asa_5] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[stg_fact_radius_asa_4]    Script Date: 05/09/2011 13:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[stg_fact_radius_asa_4](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_4] ON [dbo].[stg_fact_radius_asa_4] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[stg_fact_radius_asa_3]    Script Date: 05/09/2011 13:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[stg_fact_radius_asa_3](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_3] ON [dbo].[stg_fact_radius_asa_3] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[stg_fact_radius_asa_2]    Script Date: 05/09/2011 13:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[stg_fact_radius_asa_2](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_2] ON [dbo].[stg_fact_radius_asa_2] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[stg_fact_radius_asa_1]    Script Date: 05/09/2011 13:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[stg_fact_radius_asa_1](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_1] ON [dbo].[stg_fact_radius_asa_1] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[stg_fact_radius_asa_0]    Script Date: 05/09/2011 13:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[stg_fact_radius_asa_0](
	[Update_Time] [datetime] NULL,
	[NASID] [int] NULL,
	[user_key] [int] NULL,
	[Username] [varchar](100) NULL,
	[UserRole] [varchar](50) NULL,
	[NASPort] [int] NULL,
	[ServiceType] [int] NULL,
	[FramedIPAddress] [varchar](15) NULL,
	[AcctStatusType] [int] NULL,
	[AcctInputOctets] [varchar](20) NULL,
	[AcctOutputOctets] [varchar](20) NULL,
	[AccSessionID] [varchar](100) NULL,
	[AccAuthentic] [varchar](50) NULL,
	[AcctInputPackets] [int] NULL,
	[AcctOutputPackets] [int] NULL,
	[AcctTerminateCause] [varchar](50) NULL,
	[CallingStationID] [varchar](50) NULL,
	[Tunnel_Client_Endpoint] [varchar](20) NULL,
	[ServiceTypeName] [varchar](25) NULL,
	[StatusType] [varchar](45) NULL,
	[AcctSessionTime] [int] NULL,
	[SessionStartTime] [datetime] NULL,
	[Checked] [int] NULL,
	[date_key] [int] NULL,
	[framed_ip_long] [bigint] NULL,
	[call_station_ip_long] [bigint] NULL,
	[tunnel_client_ip_long] [bigint] NULL,
	[ipFROM] [bigint] NULL,
	[ipTO] [bigint] NULL,
	[countrySHORT] [varchar](2) NULL,
	[countryLONG] [varchar](64) NULL,
	[ipREGION] [varchar](128) NULL,
	[ipCITY] [varchar](128) NULL,
	[ipLATITUDE] [float] NULL,
	[ipLONGITUDE] [float] NULL,
	[ipZIPCODE] [varchar](5) NULL,
	[ipTIMEZONE] [varchar](8) NULL,
	[ipISP] [varchar](255) NULL,
	[ipDOMAIN] [varchar](128) NULL,
	[ipNETSPEED] [varchar](8) NULL
) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO
CREATE CLUSTERED INDEX [IX_stg_fact_radius_asa_0] ON [dbo].[stg_fact_radius_asa_0] 
(
	[Update_Time] DESC
)WITH (DATA_COMPRESSION = PAGE, PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = OFF, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 85) ON [asa_JanDecMonthDateRangePS]([Update_Time])
GO